package com.hunanwenli.service.userInfo;
import com.hunanwenli.entity.CommentaryInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@Component
@FeignClient(value = "007-PROVIDER-USERINFO")
public interface FeignUserInfoService {

    @PutMapping(value = "/userInfo/putUserInfo/{update}")
    Boolean putUserInfo(@PathVariable("update")String update);

    @PutMapping(value = "/userInfo/setCommentary/{uuid}/{movie_content}/{movie_name}/{isPrivate}")
    @ResponseBody
    String setCommentary(@PathVariable("uuid") String uuid,@PathVariable("movie_content") String movieContent,
                                 @PathVariable("movie_name") String movieName,@PathVariable("isPrivate") Boolean isPrivate);

    @GetMapping(value = "/userInfo/getCommentary/{uid}/{name}/{start}")
    @ResponseBody
    List<CommentaryInfo> getCommentary(@PathVariable("uid") Integer uid, @PathVariable("name") String name,
                                       @PathVariable("start") Integer start);

    @GetMapping(value = "/userInfo/getPage/{uuid}")
    @ResponseBody
    Integer getPage(@PathVariable("uuid") String uuid);

    @PostMapping(value = "/userInfo/delCollection/{pid}/{uuid}")
    @ResponseBody
    Boolean delCollection(@PathVariable("pid") Integer pid,@PathVariable("uuid") String uuid);


    @PostMapping(value = "/userInfo/addCollection/{pid}/{uuid}")
    @ResponseBody
    Boolean addCollection(@PathVariable("pid") Integer pid,@PathVariable("uuid") String uuid);

    @PostMapping(value = "/userInfo/addGood/{pid}/{uuid}")
    @ResponseBody
    Boolean addGood(@PathVariable("pid") Integer pid,@PathVariable("uuid") String uuid);

    @PostMapping(value = "/userInfo/delGood/{pid}/{uuid}")
    @ResponseBody
    Boolean delGood(@PathVariable("pid") Integer pid,@PathVariable("uuid") String uuid);

    @PostMapping(value = "/userInfo/getAppraisalByPid/{pid}")
    @ResponseBody
    List<Map<String,String>> getAppraisalByPid(@PathVariable("pid") Integer pid);

    @PostMapping(value = "/userInfo/commentCritic/{pid}/{comment}/{uuid}")
    @ResponseBody
    Boolean commentCritic(@PathVariable("pid") Integer pid,@PathVariable("comment") String comment,
                                 @PathVariable("uuid") String uuid);

    @GetMapping(value = "/userInfo/getAsideInfo/{uid}")
    @ResponseBody
    Map<String,Integer> getAsideInfo(@PathVariable("uid")Integer uid);

    @GetMapping(value = "/userInfo/getCommentaryByUid/{uid}")
    @ResponseBody
    List<CommentaryInfo> getCommentaryByUid(@PathVariable("uid") Integer uid);

    @GetMapping(value = "/userInfo/getJoinKeepByUid/{uid}")
    @ResponseBody
    List<CommentaryInfo> getJoinKeepByUid(@PathVariable("uid") Integer uid);

    @GetMapping(value = "/userInfo/getJoinLikeByUid/{uid}")
    @ResponseBody
    List<CommentaryInfo> getJoinLikeByUid(@PathVariable("uid") Integer uid);

    @GetMapping(value = "/userInfo/getByUidOrderLimit5/{start}/{uid}")
    @ResponseBody
    List<CommentaryInfo> getByUidOrderLimit5( @PathVariable("start") Integer start,
                                              @PathVariable("uid") Integer uid);

    @GetMapping(value = "/userInfo/getCountPage")
    @ResponseBody
    Integer getCountPage();

    @PostMapping(value = "/userInfo/action/{action}/{id}/{uuid}")
    @ResponseBody
    Integer action(@PathVariable("action") String action,@PathVariable("id") Integer id,
                          @PathVariable("uuid") String uuid);

    @GetMapping(value = "/userInfo/getAllFriendByUid/{uid}")
    @ResponseBody
    List<Map<String,String>>  getAllFriendByUid(@PathVariable("uid") Integer uid);

    @GetMapping(value = "/userInfo/getUserInfoToMe/{uid}/{fid}/{start}")
    @ResponseBody
    List<CommentaryInfo> getUserInfoToMe(@PathVariable("uid") Integer uid,@PathVariable("fid") Integer fid,
                                                @PathVariable("start") Integer start);
}
